using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MsdnVideo
{
    public partial class AlquilarForm : PlantillaForm 
    {
        public AlquilarForm()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SeleccionSociosForm formSeleccionSocios = new SeleccionSociosForm();
            formSeleccionSocios.ShowDialog();
            textBox2.Text = formSeleccionSocios.DNI;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            PeliculasCN peliCN = new PeliculasCN();
            try
            {
                peliCN.AlquilarPelicula(textBox1.Text, textBox2.Text);
                Close();
            }
            catch (Exception __ERR)
            {
                MessageBox.Show(__ERR.Message.ToString());
            }
          
        }
    }
}